/**
 * 
 */
package demo.java.lang.management.vo;

/**
 * @author mandy
 *
 */
public enum EventType {
	AD("ad","ad"),
	PLAY("play","play"),
	CDN("cdn","cdn"),
	DOWNLOAD("download","download"),
	RECOMMEND("recommend","recommend"),
	SEARCH("search","search"),
	ERRORLOG("errorlog","errorlog"),
	SOUTHGATE_ERRORLOG("southgate_errorlog","southgate_errorlog"),
	PUSH("push","push"),
	LIVE("live","live"),
	OTHER("other","other"),
	CRASH("crash","crash"),
	REGISTERFLOW("registerflow","registerflow"),
    CLICK2HDFS("click2hdfs","click2hdfs"),
	COLLECTOR("collector","collector"),
	MOBILE("mobile","mobile")
	;

	
	private String eventType;
	private String desc;

	EventType(String eventType, String desc) {
		this.eventType = eventType;
		this.desc = desc;
	}
	
	/**
	 * @return the eventType
	 */
	public String getEventType() {
	
		return eventType;
	}

	/**
	 * @param eventType the eventType to set
	 */
	public void setEventType(String eventType) {
	
		this.eventType = eventType;
	}

	
	/**
	 * @return the desc
	 */
	public String getDesc() {
	
		return desc;
	}

	
	/**
	 * @param desc the desc to set
	 */
	public void setDesc(String desc) {
	
		this.desc = desc;
	}

	/**
	 * 
	 * @param type
	 * @return
	 */
	public static EventType getEnum(String eventType) {
		for (EventType orderStatus : EventType.values()) {
			if (orderStatus.getEventType().equalsIgnoreCase(eventType)) {
				return orderStatus;
			}
		}

		return null;
	}

}
